#!/bin/bash

# 默认运行nographic
if [ $# -eq 0 ]
then
  runqemu qemux86 core-image-apd-devel nographic \
         qemuparams="-net socket,mcast=224.244.224.245:30490"
  exit $?
fi

if [[ "$1" == "kvm" ]]
then
  runqemu qemux86 core-image-apd-devel nographic kvm \
        qemuparams="-net socket,mcast=224.244.224.245:30490"
  exit $?
fi

if [[ "$1" == "smp" ]]
then
  runqemu qemux86 core-image-apd-devel \
         qemuparams="-net socket,mcast=224.244.224.245:30490 -nographic -enable-kvm -smp 2"
  exit $?
fi

# graphic
if [[ "$1" == "graphic" ]]
then 
  runqemu qemux86 core-image-apd-devel
  exit $?
fi
